* Dano et al. (2024)
* Master dofile for analysis

**Core directory - TO BE CHANGED BY USER
global dir "C:/Users/80002088/Dropbox/Incumbency_Advantage_France/replication"

********************************************************************************
* Set path to working directories:
********************************************************************************

global raw_data "$dir/data/raw"
global intermediate "$dir/data/intermediate"
global output "$dir/data/output"
global temp "$dir/data/temp"
global programs "$dir/programs/dofiles"
global main "$dir/figures_tables/main_paper"
global appendix "$dir/figures_tables/appendix"

********************************************************************************
* Install ados / packages:
********************************************************************************

ssc install estout, replace
ssc install rdrobust, replace
net install rddensity, from(https://raw.githubusercontent.com/rdpackages/rddensity/master/stata) replace
ssc install texsave, replace

********************************************************************************
* Define required functions:
********************************************************************************

do "$programs/program_bounds.do"

********************************************************************************
* Set parameters:
********************************************************************************

global reps=10 //number of bootstrap replications (should be set to 10,000 to replicate the standard errors on upper and lower bounds)

********************************************************************************
* Running the analysis:
********************************************************************************

** Results in paper **
do "$programs/analysis_main.do"

** Results in Online Appendix **
do "$programs/analysis_appendix.do"
